package cn.stylefeng.guns.modular.business.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author jwj
 * @since 2019-07-12
 */
@TableName("c_order")
@Data
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "order_id", type = IdType.AUTO)
    private Integer orderId;

    @TableField("order_no")
    private String orderNo;

    @TableField("owner_user_id")
    private Long ownerUserId;

    @TableField("owner_user")
    private String ownerUser;

    /**
     * 实际金额
     */
    @TableField("pay_amount")
    private BigDecimal payAmount;

    /**
     * 订单金额
     */
    @TableField("amount")
    private BigDecimal amount;

    /**
     * 成本费率
     */
    @TableField("cost_rate")
    private Float costRate;

    /**
     * 实际费率
     */
    @TableField("pay_rate")
    private Float payRate;

    /**
     * 申请折扣
     */
    @TableField("order_rate")
    private Float orderRate;

    /**
     * 订单状态0，待审核，1审核成功，待结算2审核失败。3已结算
     */
    @TableField("order_status")
    private Integer orderStatus;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;


    /**
     * 是否删除
     */
    @TableField("delete_flag")
    private Integer deleteFlag;

    /**
     * 审核人员id
     */
    @TableField("approve_user_id")
    private Long approveUserId;

    /**
     * 审核人员用户名
     */
    @TableField("approve_user")
    private String approveUser;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;


    @Override
    public String toString() {
        return "Order{" +
        "orderId=" + orderId +
        ", orderNo=" + orderNo +
        ", ownerUserId=" + ownerUserId +
        ", ownerUser=" + ownerUser +
        ", payAmount=" + payAmount +
        ", amount=" + amount +
        ", costRate=" + costRate +
        ", payRate=" + payRate +
        ", orderStatus=" + orderStatus +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", delFlag=" + deleteFlag +
        ", approveUserId=" + approveUserId +
        ", approveUser=" + approveUser +
        ", remark=" + remark +
        "}";
    }
}
